﻿using Microsoft.Scripting;
using Microsoft.VisualStudio.TextManager.Interop;

namespace YaTools.Yaml.LanguagePackage
{
    internal static class VsExtensions
    {
        public static TextSpan TextSpan(this SourceSpan ss)
        {
            return new TextSpan
                       {
                           iStartLine = ss.Start.Line - 1,
                           iStartIndex = ss.Start.Column - 1,
                           iEndLine = ss.End.Line - 1,
                           iEndIndex = ss.End.Column - 1
                       };
        }
    }
}